#!/user/bin/env node

const log = console.log;

log('PID:', process.pid);

process.stdin.resume();
//在“旧”流模式下，stdin 流默认是暂停的，所以必须调用 process.stdin.resume() 来读取它。 

process.on('SIGINT',()=>{
  log('You have pressed Ctrl + c. Good bye!');
  process.exit();
});

process.on('SIGTSTP',()=>{
  log('You have pressed Ctrl + z. Hello!');
} );


